/*

   Allows you to disable / enable weaponry in a certain location.
   
Usage:
   
function onCreated() {
  join("event_spar");
}

//CLIENTSIDE
//Fix the clientside above, script errors if I use the #.

function onCreated() {
  this.spar_width  = <tilewidth>;
  this.spar_height = <tileheight>;
}

*/

//#CLIENTSIDE

function onCreated() {
  setTimer(0.1);
}

function onTimeout() {
  // Check Status
  if ((player.x + 1.5) in |this.x, this.x + this.spar_width| &&
      (player.y + 2.0) in |this.y, this.y + this.spar_height|) 
  {
    enableweapons();
  } else {
    disableweapons();
  }
  // Continue Looping
  setTimer(0.1);
}
